#ifndef HW_ELEC_H
#define HW_ELEC_H

#include "gd32f30x.h"
#include "systick.h"

#include "bsp_dac.h"

/**
  * 线圈定义
**/
typedef struct{
	uint16_t conver;		//SIN数组指针
	int16_t  sin_data;	//SIN换算数值
	uint16_t dac_reg;		//12位DAC数值
}coil_t;

extern void hw_elec_set_sleep(void);
extern void hw_elec_set_brake(void);
extern void hw_elec_set_divide_current(uint32_t divide, int32_t elec_ma);


#endif
